<html>
    <head>
        <title>pipelinejs</title>
        <meta name="creator" content="peter.ducai@gmail.com">
        <script src="js/pipelinejs.js"></script>
        <script type="text/javascript">
            function initPipes() {
                
                var canvas = document.getElementById('pipelinecanvas');
                
                var ctx = canvas.getContext('2d'); 
                
                pipelinejs.init();
                
                
                pipelinejs.addGroup('Sirava','green');
                pipelinejs.addNode(ctx, "server1", "1.1.22.421", 20, 20);
                pipelinejs.addNode(ctx, "server2", "3.1.22.422", 130, 95);
                pipelinejs.addNode(ctx, "server3", "3.1.22.112", 180, 220,'Sirava');
                pipelinejs.addNode(ctx, "server4", "44.92.22.112", 350, 290);
                
                pipelinejs.addConnector(ctx,'server1','eth0');
                pipelinejs.addConnector(ctx,'server1','eth1');
                pipelinejs.addConnector(ctx,'server1','eth2');
                pipelinejs.addConnector(ctx,'server1','eth3');
                pipelinejs.addConnector(ctx,'server1','eth4');
                pipelinejs.addConnector(ctx,'server1','eth5');
                pipelinejs.addConnector(ctx,'server2','eth0');
                pipelinejs.addConnector(ctx,'server3','eth0');
                pipelinejs.addConnector(ctx,'server4','eth0');
                
                pipelinejs.addWire(ctx,'server2','eth0','server3','eth0');
                pipelinejs.addWire(ctx,'server1','eth1','server3','eth0');
                pipelinejs.addWire(ctx,'server1','eth0','server3','eth0');
                pipelinejs.addWire(ctx,'server3','eth0','server4','eth0');
                pipelinejs.addWire(ctx,'server1','eth4','server2','eth0');

            }
        </script>
    </head>

    <body onload="initPipes();">
        <h1>pipelinejs</h1>
        <div>
            default group: blue<br>
            Sirava group: green<br>
            <canvas id="pipelinecanvas" width="600" height="600"></canvas>
        </div>
    </body>
</html>

